//g++ -g -o value_test value_codec_test.cpp -I/home/sun/workspace/SDFS2 -I/home/sun/libs/muduo/include

#include <sdfs/tracker/FileInfoCodec.h>
#include <iostream>
using namespace std;
using namespace sdfs::tracker;

int main()
{
	muduo::string name="storage01";
	int blockid = 1;
	long offset = 12312312;
	long length = 3213231123;

	muduo::string value = FileInfoCodec::getValue(name, blockid, offset, length);
	cout << value <<endl;
	FileInfoCodec codec(value);
	cout << "name: " <<codec.getStorageName() <<endl;
	cout << "blockid: " <<codec.getBlockId() <<endl;
	cout << "offset: " <<codec.getOffset() <<endl;
	cout << "length: " <<codec.getLength() <<endl;
}
